package com.android.equipment.net.callbck;

import com.google.gson.Gson;

/**
 * Created by ccb on 2017/12/7.
 */

public class NetException extends IllegalStateException {

    private BaseResponseBean errorBean;

    public NetException(String s) {
        super(s);

        BaseResponseBean baseResponseBean = new Gson().fromJson(s, BaseResponseBean.class);
        baseResponseBean.toResponseBean();
        errorBean = baseResponseBean;
//        errorBean =
//        errorBean.setMessage(errorBean.message);
//        errorBean.setStatus(errorBean.status);
    }

    public BaseResponseBean getErrorBean() {
        return errorBean;
    }
}
